package com.diligent.cloud.sfc.service;

import com.canny.commons.model.ListResult;
import com.canny.commons.model.ObjectResult;
import com.canny.commons.model.Result;
import com.diligent.cloud.sfc.model.params.OrderListParams;
import com.diligent.cloud.workorder.model.WoOrder;
import com.diligent.cloud.workorder.model.WoOrderProgressParams;
import org.springframework.http.ResponseEntity;

import java.security.Principal;

/**
 * WoOrderService interface
 *
 * @author xf107278
 * @date 3/28/2020
 */
public interface WoOrderService {
    ResponseEntity<Result> getOrderAcInfo(Long orderId, Integer stationType, Principal principal);

    ResponseEntity<Result> addOrder(WoOrder woOrder, Principal principal);

    ResponseEntity<ObjectResult<WoOrder>> selectById(Long id);

    ResponseEntity<ListResult> getOrderList(OrderListParams orderListParams);

    ResponseEntity<Result> updateOrderStatus(Integer orderAction, Long woOrderId,Long asId,  Principal principal);

    ResponseEntity<ListResult> getSameOrderByProdBatch(String prodBatch, String machCode, Long systemId, Integer orderType, Integer isFinished,Integer operationIsFinished);

    ResponseEntity<ObjectResult> addWoOrderLots(String boxCode, Long systemId, Principal principal);

    ResponseEntity<Result> updateOrderStatus(Long orderId,Long mdId ,Long asId,String prodBatch,  Principal principal);

    ResponseEntity<com.diligent.cloud.primary.data.model.Result> getWoOrderProgress(WoOrderProgressParams orderProgressParams);

    ResponseEntity<com.diligent.cloud.primary.data.model.Result> updateOrderDocStatus(String action, WoOrder woOrder, Principal principal);

}
